// 定义 TrainType 接口描述火车类型的数据结构
interface TrainType {
    code: string;
    desc: string;
    price: string; // 假设 price 字段为字符串类型，若为数字类型请改为 number
}

// 定义 TRAIN_TYPE 常量为 Record 类型，键为火车类型代码，值为 TrainType 对象
export const TRAIN_TYPE: Record<string, TrainType> = {
    G: {code: "G", desc: "高铁", price: "1.6"},
    D: {code: "D", desc: "动车", price: "1.4"},
    T: {code: "T", desc: "特快", price: "1.2"},
    K: {code: "K", desc: "快速", price: "0.8"},
    Z: {code: "Z", desc: "直达", price: "0.8"},
    C: {code: "C", desc: "城际", price: "0.6"},
    S: {code: "S", desc: "普通", price: "0.4"},
    Y: {code: "Y", desc: "普通", price: "0.4"},
    M: {code: "M", desc: "动车组", price: "0.6"},
    F: {code: "F", desc: "动车组", price: "0.6"},
    L: {code: "L", desc: "临时旅客列车", price: "0.6"},
};

// 定义 TRAIN_TYPE_ARRAY 常量为 TrainType 数组
export const TRAIN_TYPE_ARRAY: TrainType[] = [
    {code: "G", desc: "高铁", price: "1.6"},
    {code: "D", desc: "动车", price: "1.4"},
    {code: "T", desc: "特快", price: "1.2"},
    {code: "K", desc: "快速", price: "0.8"},
    {code: "Z", desc: "直达", price: "0.8"},
    {code: "C", desc: "城际", price: "0.6"},
    {code: "S", desc: "普通", price: "0.4"},
    {code: "Y", desc: "普通", price: "0.4"},
    {code: "M", desc: "动车组", price: "0.6"},
    {code: "F", desc: "动车组", price: "0.6"},
    {code: "L", desc: "临时旅客列车", price: "0.6"},
];
